#/*!
# * native.pro  0.4.0 / Nov 14, 2010
# *
# * Copyright (c) 2010 - 2011, cute4j.com and contributors.
# *
# * This software is licensed under the LGPL version 2.1 license.
# * A copy of this license is included in the file LICENSE-LGPL.txt.
# */

# Note: Define NO_PLATFORM_CODE if you don't want to use platform-specific code.
# DEFINES += NO_PLATFORM_CODE

message("native.pro project file")

# Cute4j :: Project File. ------------------------------------------------------

TEMPLATE = lib
QT += opengl
TARGET = Cute4j

win32 {
  DESTDIR = temp
} else {
  DESTDIR = ../../dev/libs/native/linux
  VERSION = 0.4.0
}

DEPENDPATH += .

MOC_DIR += ./temp/moc/release
OBJECTS_DIR += ./temp/obj/release

RESOURCES += ./main/swing/resources/Cute4jSwing.qrc

CONFIG += release
#CONFIG += release test
#CONFIG += dll # for static linking

debug {
  #DEFINES += CUTE4J_DEBUG
}

# Cute4j :: Platform-Specific Files. -------------------------------------------

win32 {
  !contains(DEFINES, NO_PLATFORM_CODE) {
    DEFINES += USE_PLATFORM_CODE
    INCLUDEPATH += ./platform/win32
  }
  LFLAGS += -Wl,--add-stdcall-alias
  LIBS += -luser32
  RC_FILE = ./platform/win32/Cute4jWin32.rc
  RCC_DIR = ./temp/res
}

# Cute4j :: Includes. ----------------------------------------------------------

INCLUDEPATH +=  ./temp/moc/release \
    ./main \
    ./main/core \
    ./main/core/adapters \
    ./main/core/delegates \
    ./main/core/jni \
    ./main/swing \
    ./main/swing/adapters \
    ./main/swing/delegates \
    ./main/swing/jni \
    ./main/swing/styles \
    ./platform \
    ./main/opengl \
    ./main/opengl/adapters \
    ./main/opengl/delegates \
    ./main/opengl/jni \
    ./main/nunit \
    ./main/nunit/jni

win32 {
  INCLUDEPATH += ./include/win32/sun-jvm \
      ./include/win32/sun-jvm/win32
}

solaris {
  INCLUDEPATH += ./include/solaris/sun-jvm \
      ./include/solaris/sun-jvm/solaris
}

linux {
  INCLUDEPATH += ./include/linux/sun-jvm \
      ./include/linux/sun-jvm/linux
}

# Cute4j :: Include Files. -----------------------------------------------------

include(native.pri)

# Cute4j :: Post Link. ---------------------------------------------------------

win32 {
  TARGET_DLL = $${TARGET}.dll
  SRC_DLL = .\\$$DESTDIR\\$$TARGET_DLL
  DEST_DLL = ..\\..\\dev\\libs\\native\\win32\\$$TARGET_DLL

  QMAKE_POST_LINK = COPY $$SRC_DLL $$DEST_DLL
  QMAKE_CLEAN += $$SRC_DLL $$DEST_DLL
}
